<?php
/** 初始化项目 */
require '../../app/app.php';
/** 初始化数据库 */
use app\util\Mysql;
$database = Mysql::init();

$out = array('code' => '0', "msg" => "", "count" => "", "data" => "");
$out["count"] = $database->count("user_group");
$out["data"] = $database->select("user_group", "*");
// if (isset($_POST["username"])){
//     $list = $database->select("group","groupname");
//     echo json_encode($list);
// }
// $list = $database->select("group","*");
echo json_encode($out);
